﻿using D.Traceability.ErrorCode;
using MediatR;

namespace D.Traceability.Write.API.APPlicant.Command
{
    /// <summary>
    /// 添加溯源信息-命令
    /// </summary>
    public class AddTraceCommand: IRequest<APIResult<string>>
    {
        /// <summary>
        /// 商品名称
        /// </summary>
        public string GoodsName { get; set; }

        /// <summary>
        /// 生产批次，设置为唯一
        /// </summary>
        //[Index(IsUnique = true)]
        public string TraceaBatch { get; set; }

        /// <summary>
        /// 保质期（天）
        /// </summary>
        public int TraceaQualityDay { get; set; }
        /// <summary>
        /// 生产许可证号
        /// </summary>
        public string TraceaLicenseCode { get; set; }
        /// <summary>
        /// 生产企业
        /// </summary>
        public string TraceaEnterpriseName { get; set; }
        /// <summary>
        /// 信息完善度
        /// </summary>
        public decimal? TraceaImprove { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        public string TraceaCreateName { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime TraceaCreateTime { get; set; }
        /// <summary>
        /// 修改人
        /// </summary>
        public string? TraceaUpdateName { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? TraceaUpdateTime { get; set; }
        /// <summary>
        /// 图片(封面图)
        /// </summary>
        public string? TraceaPicture { get; set; }
        /// <summary>
        /// 隐藏字段 false 显示  true 隐藏
        /// </summary>
        public bool TraceaIsNo { get; set; }
        /// <summary>
        /// 逻辑删除 false 未删除  true 删除
        /// </summary>
        public bool TraceaIsDelete { get; set; }
    }
}
